#!/usr/bin/node
const http=require('http'),
      log=console.log,
      url=require('url'),
      addr=process.argv[2];

http.get(addr,(res)=>{
 // let data;

  //res.on('data',(chunk)=>{
    //data+=chunk;
 // });

  //res.on('end',()=>{
   // log(data);
//  });



  //print response headers
  //content-length:22
  log(`HTTP/${res.http} ${res.statusCode} ${res.statusMessage}`);
  log(res.headers);
  
  //print response body
  //  res.pipe(process.stdout);
});

